<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="StudentViewDlg" widgetVar="StudentViewDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.ViewStudentTitle}">

            <h:form id="StudentViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{studentController.selected != null}">

                        <h:outputText value="#{bundle.ViewStudentLabel_idStudent}"/>
                        <h:outputText value="#{studentController.selected.idStudent}" title="#{bundle.ViewStudentTitle_idStudent}"/>

                        <h:outputText value="#{bundle.ViewStudentLabel_idNumber}"/>
                        <h:outputText value="#{studentController.selected.idNumber}" title="#{bundle.ViewStudentTitle_idNumber}"/>

                        <h:outputText value="#{bundle.ViewStudentLabel_fullName}"/>
                        <h:outputText value="#{studentController.selected.fullName}" title="#{bundle.ViewStudentTitle_fullName}"/>

                        <h:outputText value="#{bundle.ViewStudentLabel_status}"/>
                        <h:selectBooleanCheckbox id="status" value="#{studentController.selected.status}" title="#{bundle.EditStudentTitle_status}" required="true" requiredMessage="#{bundle.EditStudentRequiredMessage_status}" disabled="true"/>

                        <h:outputText value="#{bundle.ViewStudentLabel_activationDate}"/>
                        <h:outputText value="#{studentController.selected.activationDate}" title="#{bundle.ViewStudentTitle_activationDate}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewStudentLabel_userid}"/>
                        <h:outputText value="#{studentController.selected.userid.id}"/>

                        <h:outputText value="#{bundle.ViewStudentLabel_bookBorrowingList}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{bundle.Close}" onclick="StudentViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
